package com.wyzz.hr.pojo;

import com.wyzz.hr.base.Constants;
import com.wyzz.hr.pojo.base.BaseEmpsalarypay;
import com.wyzz.hr.util.MyTools;

import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public class Empsalarypay extends BaseEmpsalarypay implements Constants {

	public Empsalarypay() {
	}

	public Empsalarypay(String id) {
		super(id);
	}

	public Empsalarypay(String id, Jobgrade espJobgrade, Department espDept,
			Emptype espEmptype, Employee espEmpno, Location espLocation,
			Empsalaryconfig espEmpconfig, Empsalaryacctversion espEsavId,
			String espYearmonth, Integer espBenefitPlans, Integer espChanged) {
		super(id, espJobgrade, espDept, espEmptype, espEmpno, espLocation,
				espEmpconfig, espEsavId, espYearmonth, espBenefitPlans,
				espChanged);
	}

	public void encryEMPPaid(Empsalarypay paid) {
		String empId = paid.getEspEmpno().getId();
		Class ownerClass = paid.getClass();
		try {
			for (int i = 1; i <= 48; i++) {
				Method espMethod = ownerClass.getMethod((new StringBuilder())
						.append("getEspColumn").append(i).toString(),
						new Class[0]);
				BigDecimal temp = (BigDecimal) espMethod.invoke(paid,
						new Object[0]);
				paid.setEncry((new StringBuilder()).append("EspColumn").append(
						i).toString(), temp, empId, MyTools.BIGDECIMAL);
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
		paid.setEncry("espBankAccountNo", paid.getEspBankAccountNo(), paid
				.getEspEmpno().getId(), MyTools.STRING);
		paid.setEncry("EspComment", paid.getEspComment(), paid.getEspEmpno()
				.getId(), MyTools.CHINESE);
	}

	public void decryEMPPaid(Empsalarypay paid) {
		String empId = paid.getEspEmpno().getId();
		try {
			Class esaClass = paid.getClass();
			for (int i = 1; i <= 48; i++) {
				Method esaMethod = esaClass.getMethod((new StringBuilder())
						.append("setEspColumn").append(i).toString(),
						new Class[] { java.math.BigDecimal.class });
				esaMethod.invoke(paid, new Object[] { (BigDecimal) paid
						.getDecry((new StringBuilder()).append("EspColumn")
								.append(i).toString(), empId,
								MyTools.BIGDECIMAL) });
			}

			paid.setEspBankAccountNo((String) paid.getDecry("espBankAccountNo",
					empId, MyTools.STRING));
			paid.setEspComment((String) paid.getDecry("EspComment", empId,
					MyTools.CHINESE));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public BigDecimal getShowColumn1() {
		return showColumn1;
	}

	public void setShowColumn1(BigDecimal showColumn1) {
		this.showColumn1 = showColumn1;
	}

	public BigDecimal getShowColumn4() {
		return showColumn4;
	}

	public void setShowColumn4(BigDecimal showColumn4) {
		this.showColumn4 = showColumn4;
	}

	public BigDecimal getShowColumn7() {
		return showColumn7;
	}

	public void setShowColumn7(BigDecimal showColumn7) {
		this.showColumn7 = showColumn7;
	}

	public List getAcctItems() {
		return acctItems;
	}

	public void setAcctItems(List acctItems) {
		this.acctItems = acctItems;
	}

	public Empbenefit getBenefit() {
		return benefit;
	}

	public void setBenefit(Empbenefit benefit) {
		this.benefit = benefit;
	}

	public BenefitType getBenefitType() {
		return benefitType;
	}

	public void setBenefitType(BenefitType benefitType) {
		this.benefitType = benefitType;
	}

	public Attendmonthly getAttendMonthly() {
		return attendMonthly;
	}

	public void setAttendMonthly(Attendmonthly attendMonthly) {
		this.attendMonthly = attendMonthly;
	}

	public Empbenefitplan getBenefitPlan() {
		return benefitPlan;
	}

	public void setBenefitPlan(Empbenefitplan benefitPlan) {
		this.benefitPlan = benefitPlan;
	}

	public Empbenefitplan getAddBenefitPlan() {
		return addBenefitPlan;
	}

	public void setAddBenefitPlan(Empbenefitplan addBenefitPlan) {
		this.addBenefitPlan = addBenefitPlan;
	}

	public Department getEspBranch() {
		return espBranch;
	}

	public void setEspBranch(Department espBranch) {
		this.espBranch = espBranch;
	}

	public Department getEspDeptNo1() {
		return espDeptNo1;
	}

	public void setEspDeptNo1(Department espDeptNo1) {
		this.espDeptNo1 = espDeptNo1;
	}

	public Department getEspDeptNo2() {
		return espDeptNo2;
	}

	public void setEspDeptNo2(Department espDeptNo2) {
		this.espDeptNo2 = espDeptNo2;
	}

	public Department getEspDeptNo3() {
		return espDeptNo3;
	}

	public void setEspDeptNo3(Department espDeptNo3) {
		this.espDeptNo3 = espDeptNo3;
	}

	public Department getEspDeptNo4() {
		return espDeptNo4;
	}

	public void setEspDeptNo4(Department espDeptNo4) {
		this.espDeptNo4 = espDeptNo4;
	}

	public Department getEspDeptNo5() {
		return espDeptNo5;
	}

	public void setEspDeptNo5(Department espDeptNo5) {
		this.espDeptNo5 = espDeptNo5;
	}

	public String getYearAndMonth() {
		return yearAndMonth;
	}

	public void setYearAndMonth(String yearAndMonth) {
		this.yearAndMonth = yearAndMonth;
	}

	public BigDecimal getShowColumn15() {
		return showColumn15;
	}

	public void setShowColumn15(BigDecimal showColumn15) {
		this.showColumn15 = showColumn15;
	}

	public BigDecimal getShowColumn16() {
		return showColumn16;
	}

	public void setShowColumn16(BigDecimal showColumn16) {
		this.showColumn16 = showColumn16;
	}

	public BigDecimal getShowColumn17() {
		return showColumn17;
	}

	public void setShowColumn17(BigDecimal showColumn17) {
		this.showColumn17 = showColumn17;
	}

	public BigDecimal getShowColumn18() {
		return showColumn18;
	}

	public void setShowColumn18(BigDecimal showColumn18) {
		this.showColumn18 = showColumn18;
	}

	public BigDecimal getShowColumn19() {
		return showColumn19;
	}

	public void setShowColumn19(BigDecimal showColumn19) {
		this.showColumn19 = showColumn19;
	}

	public BigDecimal getShowColumn8() {
		return showColumn8;
	}

	public void setShowColumn8(BigDecimal showColumn8) {
		this.showColumn8 = showColumn8;
	}

	public Map getOutPutList() {
		return outPutList;
	}

	public void setOutPutList(Map outPutList) {
		this.outPutList = outPutList;
	}

	public List getPerfplans() {
		return perfplans;
	}

	public void setPerfplans(List perfplans) {
		this.perfplans = perfplans;
	}

	private static final long serialVersionUID = 1L;
	private BigDecimal showColumn1;
	private BigDecimal showColumn4;
	private BigDecimal showColumn7;
	private BigDecimal showColumn8;
	private BigDecimal showColumn15;
	private BigDecimal showColumn16;
	private BigDecimal showColumn17;
	private BigDecimal showColumn18;
	private BigDecimal showColumn19;
	private List acctItems;
	private Empbenefit benefit;
	private BenefitType benefitType;
	private Attendmonthly attendMonthly;
	private List perfplans;
	private Empbenefitplan benefitPlan;
	private Empbenefitplan addBenefitPlan;
	private Department espBranch;
	private Department espDeptNo1;
	private Department espDeptNo2;
	private Department espDeptNo3;
	private Department espDeptNo4;
	private Department espDeptNo5;
	private String yearAndMonth;
	private Map outPutList;
}
